package ro.cityprojects.adminloc.entities;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Set;

/**
 * Report class
 *
 * @author bogdan.solga
 * 
 * Date: 13.06.2013, time: 17:47
 */
@Entity
public class Report {

    @Id
    @javax.persistence.Column(name = "REPORT_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer reportId;

    public Integer getReportId() {
        return reportId;
    }

    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    @javax.persistence.Column(name = "ENTRANCE_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer entranceId;

    public Integer getEntranceId() {
        return entranceId;
    }

    public void setEntranceId(Integer entranceId) {
        this.entranceId = entranceId;
    }

    @javax.persistence.Column(name = "STATE", nullable = false, insertable = true, updatable = true, length = 32, precision = 0)
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @javax.persistence.Column(name = "EMISSION_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp emissionDate;

    public Timestamp getEmissionDate() {
        return emissionDate;
    }

    public void setEmissionDate(Timestamp emissionDate) {
        this.emissionDate = emissionDate;
    }

    @javax.persistence.Column(name = "START_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp startDate;

    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    @javax.persistence.Column(name = "END_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp endDate;

    public Timestamp getEndDate() {
        return endDate;
    }

    public void setEndDate(Timestamp endDate) {
        this.endDate = endDate;
    }

    @javax.persistence.Column(name = "PERSONS_NUMBER", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer personsNumber;

    public Integer getPersonsNumber() {
        return personsNumber;
    }

    public void setPersonsNumber(Integer personsNumber) {
        this.personsNumber = personsNumber;
    }

    @javax.persistence.Column(name = "COLD_WATER", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer coldWater;

    public Integer getColdWater() {
        return coldWater;
    }

    public void setColdWater(Integer coldWater) {
        this.coldWater = coldWater;
    }

    @javax.persistence.Column(name = "COLD_WATER_LOSSES", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer coldWaterLosses;

    public Integer getColdWaterLosses() {
        return coldWaterLosses;
    }

    public void setColdWaterLosses(Integer coldWaterLosses) {
        this.coldWaterLosses = coldWaterLosses;
    }

    @javax.persistence.Column(name = "HOT_WATER", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer hotWater;

    public Integer getHotWater() {
        return hotWater;
    }

    public void setHotWater(Integer hotWater) {
        this.hotWater = hotWater;
    }

    @javax.persistence.Column(name = "HOT_WATER_LOSSES", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer hotWaterLosses;

    public Integer getHotWaterLosses() {
        return hotWaterLosses;
    }

    public void setHotWaterLosses(Integer hotWaterLosses) {
        this.hotWaterLosses = hotWaterLosses;
    }

    @javax.persistence.Column(name = "ELECTRICITY", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer electricity;

    public Integer getElectricity() {
        return electricity;
    }

    public void setElectricity(Integer electricity) {
        this.electricity = electricity;
    }

    @javax.persistence.Column(name = "SEWAGE", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer sewage;

    public Integer getSewage() {
        return sewage;
    }

    public void setSewage(Integer sewage) {
        this.sewage = sewage;
    }

    @javax.persistence.Column(name = "HEATING", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer heating;

    public Integer getHeating() {
        return heating;
    }

    public void setHeating(Integer heating) {
        this.heating = heating;
    }

    @javax.persistence.Column(name = "COMMON_EXPENSES", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer commonExpenses;

    public Integer getCommonExpenses() {
        return commonExpenses;
    }

    public void setCommonExpenses(Integer commonExpenses) {
        this.commonExpenses = commonExpenses;
    }

    @javax.persistence.Column(name = "OTHER_EXPENSES", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer otherExpenses;

    public Integer getOtherExpenses() {
        return otherExpenses;
    }

    public void setOtherExpenses(Integer otherExpenses) {
        this.otherExpenses = otherExpenses;
    }

    @javax.persistence.Column(name = "TOTAL_DEBTS", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer totalDebts;

    public Integer getTotalDebts() {
        return totalDebts;
    }

    public void setTotalDebts(Integer totalDebts) {
        this.totalDebts = totalDebts;
    }

    @OneToMany(mappedBy = "reportByReportId")
    private Set<ApartmentExpense> apartmentExpensesByReportId;

    public Set<ApartmentExpense> getApartmentExpensesByReportId() {
        return apartmentExpensesByReportId;
    }

    public void setApartmentExpensesByReportId(Set<ApartmentExpense> apartmentExpensesByReportId) {
        this.apartmentExpensesByReportId = apartmentExpensesByReportId;
    }

    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "REPORT_TYPE", referencedColumnName = "REPORT_TYPE_ID", nullable = false)
    private ReportTypes reportTypesByReportType;

    public ReportTypes getReportTypesByReportType() {
        return reportTypesByReportType;
    }

    public void setReportTypesByReportType(ReportTypes reportTypesByReportType) {
        this.reportTypesByReportType = reportTypesByReportType;
    }
}
